import {RouteRecordRaw} from "vue-router";

const baseRouter: RouteRecordRaw[] = [
    {
        name: 'base',
        path: '/',
        component: () => import('@/layouts/base/base.vue'),
        redirect: to => ({...to, name: 'main'}),
        children: [
            {
                name: 'main',
                path: 'main',
                component: () => import('@/layouts/base/main.vue'),
                redirect: to => ({...to, name: 'main-box'}),
                children: [
                    {
                        name: 'main-box',
                        path: 'main-box',
                        component: () => import('@/pages/base/main/index.vue')
                    }
                ]
            }, {
                name: 'sort',
                path: 'sort',
                component: () => import('@/layouts/base/sort.vue'),
                redirect: to => ({...to, name: 'sort-box'}),
                children: [
                    {
                        name: 'sort-box',
                        path: 'sort-box',
                        component: () => import('@/pages/base/sort/index.vue')
                    }
                ]
            }
        ]
    }
]

export default baseRouter
